package xyz.kongbai121.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import xyz.kongbai121.demo.domain.ChatList;

import java.util.List;

/**
 * 私信 Mapper
 * @author 空白
 */
@Repository
public interface ChatListMapper extends BaseMapper<ChatList> {
    /**
     * 聊天数据获取
     * @param userId        用户id
     * @param toUserId      对方id
     */
    ChatList get(Long userId, Long toUserId);

    /**
     * 聊天列表数据获取
     * @param userId        用户id
     */
    List<ChatList> getList(Long userId);
}
